package org.hhchat.leetcode.banarySearch;

/**
 * Created by HMH on 2017/3/29.
 */
public class code287 {

    public class Solution {
        public int findDuplicate(int[] nums) {
            for(int i=0;i<nums.length;i++) {
                for(int j=i+1;j<nums.length;j++) {
                    if(nums[i]==nums[j])
                        return nums[i];
                }
            }
            return 0;
        }
    }
}
